﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AccidentRecordForm.aspx.cs"
    Inherits="YhmOA.Integrated.Car.AccidentRecordForm" %>

<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.1, Version=10.1.6.0, Culture=neutral, PublicKeyToken=c6bed6029ccaee5e"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.1, Version=10.1.6.0, Culture=neutral, PublicKeyToken=c6bed6029ccaee5e"
    Namespace="DevExpress.Web.ASPxCallback" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.1, Version=10.1.6.0, Culture=neutral, PublicKeyToken=c6bed6029ccaee5e"
    Namespace="DevExpress.Web.ASPxLoadingPanel" TagPrefix="dx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link type="text/css" rel="Stylesheet" href="../../Styles/Common.css" />
    <script type="text/javascript" src="../../Scripts/jquery-1.5.2.min.js"></script>
    <script type="text/javascript" src="../../Scripts/include.jquery.js"></script>
    <script type="text/javascript" src="../../Scripts/Common.js"></script>
    <script src="../../Scripts/DevEx.js" type="text/javascript"></script>
    <script type="text/javascript">
        function Save(s, e) {
            if (ASPxClientEdit.ValidateEditorsInContainer(null)) {
                cbSaveCtrl.PerformCallback();
                lpSaveCtrl.Show();
                $(this).wijdialog('close');
            }
        };
        function SaveCallback(s, e) {
            if (s.cpIsSucceed == true) {
                lpSaveCtrl.SetText('提交成功');
                parent.Search();
                window.setTimeout(function () { lpSaveCtrl.Hide(); lpSaveCtrl.SetText('正在提交信息,请稍后...'); }, 1500);
            } else {
                lpSaveCtrl.SetText('提交失败');
                window.setTimeout(function () { lpSaveCtrl.Hide(); lpSaveCtrl.SetText('正在提交信息,请稍后...'); }, 1500);
            }
        };
        //重置文本框
        function ResetEdit(s, e) {
            ASPxClientEdit.ClearEditorsInContainer(null);
            txt_DriverCtrl.Focus();
            txt_PlateNumCtrl.Focus();
            lpSaveCtrl.SetText('正在提交信息,请稍后...');
        };
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="MainRound">
        <div class="MainRoundContent">
            <div class="MainRoundContentW">
                <div class="MainBody">
                    <table class="Table" style="width: 740px">
                        <tr>
                            <td style="width: 120px">
                                车牌号码：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxComboBox ID="txt_PlateNum" runat="server" Width="200px" TabIndex="1" ClientInstanceName="txt_PlateNumCtrl"
                                    Spacing="0" DropDownStyle="DropDown" IncrementalFilteringMode="StartsWith" ClientIDMode="AutoID"
                                    ValueType="System.String">
                                    <ClientSideEvents Init="DevExObj.OnInit" LostFocus="DevExObj.OnLostFocus" GotFocus="DevExObj.OnGotFocus" />
                                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" RequiredField-ErrorText="请输入车牌号码"
                                        ErrorFrameStyle-CssClass="TableNoBorder" ErrorText="请输入车牌号码">
                                        <RequiredField IsRequired="True" />
                                    </ValidationSettings>
                                </dx:ASPxComboBox>
                            </td>
                            <td style="width: 120px">
                                驾驶员：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxComboBox ID="txt_Driver" runat="server" Width="200px" TabIndex="2" ClientInstanceName="txt_DriverCtrl"
                                    Spacing="0" DropDownStyle="DropDown" IncrementalFilteringMode="StartsWith" ClientIDMode="AutoID"
                                    ValueType="System.String">
                                    <ClientSideEvents Init="DevExObj.OnInit" LostFocus="DevExObj.OnLostFocus" GotFocus="DevExObj.OnGotFocus" />
                                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" RequiredField-ErrorText="请输入驾驶员"
                                        ErrorFrameStyle-CssClass="TableNoBorder" ErrorText="请输入驾驶员">
                                        <RequiredField IsRequired="True" />
                                    </ValidationSettings>
                                </dx:ASPxComboBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px">
                                发生时间：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxDateEdit ID="txt_Time" ClientInstanceName="txt_TimeCtrl" runat="server" TabIndex="3"
                                    NullText="请选择发生时间" Width="200px" Spacing="0" EditFormat="DateTime"
                                    PopupVerticalAlign="TopSides">
                                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" RequiredField-ErrorText="请选择发生时间"
                                        ErrorFrameStyle-CssClass="TableNoBorder">
                                        <RequiredField IsRequired="True" />
                                    </ValidationSettings>
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxDateEdit>
                            </td>
                            <td style="width: 120px">
                                事故确认者：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxTextBox ID="txt_Affirmant" ClientInstanceName="txt_AffirmantCtrl" runat="server"
                                    MaxLength="50" NullText="请输入事故确认者" TabIndex="4" Width="200px">
                                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" RequiredField-ErrorText="请输入事故确认者"
                                        ErrorFrameStyle-CssClass="TableNoBorder">
                                        <RequiredField IsRequired="True" />
                                    </ValidationSettings>
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px">
                                定损单金额：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxTextBox ID="txt_DSDAmount" ClientInstanceName="txt_DSDAmountCtrl" runat="server"
                                    MaxLength="9" NullText="请输入定损单金额" TabIndex="5" Width="200px">
                                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" RequiredField-ErrorText="请输入定损单金额"
                                        ErrorFrameStyle-CssClass="TableNoBorder">
                                        <RequiredField IsRequired="True" />
                                        <RegularExpression ErrorText="只能输入非负数字" ValidationExpression="^\d+(\.\d+)?$" />
                                    </ValidationSettings>
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxTextBox>
                            </td>
                            <td style="width: 120px">
                                保险理赔金额：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxTextBox ID="txt_BXLPJAmount" ClientInstanceName="txt_BXLPJAmountCtrl" runat="server"
                                    MaxLength="9" NullText="请输入保险理赔金额" TabIndex="6" Width="200px">
                                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" RequiredField-ErrorText="请输入保险理赔金额"
                                        ErrorFrameStyle-CssClass="TableNoBorder">
                                        <RequiredField IsRequired="True" />
                                        <RegularExpression ErrorText="只能输入非负数字" ValidationExpression="^\d+(\.\d+)?$" />
                                    </ValidationSettings>
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px">
                                本方负担金额：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxTextBox ID="txt_BFFDAmount" ClientInstanceName="txt_BFFDAmountCtrl" runat="server"
                                    MaxLength="9" NullText="请输入本方负担金额" TabIndex="7" Width="200px">
                                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" RequiredField-ErrorText="请输入本方负担金额"
                                        ErrorFrameStyle-CssClass="TableNoBorder">
                                        <RequiredField IsRequired="True" />
                                        <RegularExpression ErrorText="只能输入非负数字" ValidationExpression="^\d+(\.\d+)?$" />
                                    </ValidationSettings>
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxTextBox>
                            </td>
                            <td style="width: 120px">
                                对方负担金额：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxTextBox ID="txt_DFFDAmount" ClientInstanceName="txt_DFFDAmountCtrl" runat="server"
                                    MaxLength="9" NullText="请输入对方负担金额" TabIndex="8" Width="200px">
                                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" RequiredField-ErrorText="请输入对方负担金额"
                                        ErrorFrameStyle-CssClass="TableNoBorder">
                                        <RequiredField IsRequired="True" />
                                        <RegularExpression ErrorText="只能输入非负数字" ValidationExpression="^\d+(\.\d+)?$" />
                                    </ValidationSettings>
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px">
                                赔付到账时间：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxDateEdit ID="txt_PFDZTime" ClientInstanceName="txt_PFDZTimeCtrl" runat="server"
                                    TabIndex="9" NullText="请选择赔付到账时间" Width="200px" Spacing="0" EditFormat="DateTime"
                                    PopupVerticalAlign="TopSides">
                                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" RequiredField-ErrorText="请选择赔付到账时间"
                                        ErrorFrameStyle-CssClass="TableNoBorder">
                                        <RequiredField IsRequired="True" />
                                    </ValidationSettings>
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxDateEdit>
                            </td>
                            <td style="width: 120px">
                                办理索赔时间：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxDateEdit ID="txt_BLSPTime" ClientInstanceName="txt_BLSPTimeCtrl" runat="server"
                                    TabIndex="10" NullText="请选择办理索赔时间" Width="200px" Spacing="0" EditFormat="DateTime"
                                    PopupVerticalAlign="TopSides">
                                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" RequiredField-ErrorText="请选择办理索赔时间"
                                        ErrorFrameStyle-CssClass="TableNoBorder">
                                        <RequiredField IsRequired="True" />
                                    </ValidationSettings>
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxDateEdit>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px">
                                事故内容：
                            </td>
                            <td style="width: 620px" colspan="3">
                                <dx:ASPxMemo ID="txt_Content" runat="server" MaxLength="50" NullText="请输入事故内容" Height="50px"
                                    ClientInstanceName="txt_ContentCtrl" TabIndex="11" Width="575px">
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxMemo>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px">
                                损坏程度：
                            </td>
                            <td style="width: 620px" colspan="3">
                                <dx:ASPxMemo ID="txt_DamagedCondition" runat="server" MaxLength="50" NullText="请输入损坏程度" Height="50px"
                                    ClientInstanceName="txt_DamagedConditionCtrl" TabIndex="12" Width="575px">
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxMemo>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px">
                                和解内容：
                            </td>
                            <td style="width: 620px" colspan="3">
                                <dx:ASPxMemo ID="txt_ReconciliationContent" runat="server" MaxLength="1000" NullText="请输入和解内容" Height="50px"
                                    ClientInstanceName="txt_ReconciliationContentCtrl" TabIndex="13" Width="575px">
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxMemo>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px">
                                备注：
                            </td>
                            <td style="width: 620px" colspan="3">
                                <dx:ASPxMemo ID="txt_Remarks" runat="server" MaxLength="250" NullText="请输入备注" Height="50px"
                                    ClientInstanceName="txt_RemarksCtrl" TabIndex="14" Width="575px">
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxMemo>
                            </td>
                        </tr>
                        <tr>
                            <td style="font-weight:bold;width: 740px" colspan="4">
                                对方信息：
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px">
                                对方车牌号：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxTextBox ID="txt_OpPlateNum" ClientInstanceName="txt_OpPlateNumCtrl" runat="server"
                                    MaxLength="20" NullText="请输入对方车牌号" TabIndex="15" Width="200px">
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxTextBox>
                            </td>
                            <td style="width: 120px">
                                对方姓名：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxTextBox ID="txt_OpName" ClientInstanceName="txt_OpNameCtrl" runat="server"
                                    MaxLength="50" NullText="请输入对方姓名" TabIndex="16" Width="200px">
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px">
                                对方联系电话：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxTextBox ID="txt_OpTelNum" ClientInstanceName="txt_OpTelNumCtrl" runat="server"
                                    MaxLength="20" NullText="请输入对方联系电话" TabIndex="17" Width="200px">
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxTextBox>
                            </td>
                            <td style="width: 120px">
                                对方年龄：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxTextBox ID="txt_OpAge" ClientInstanceName="txt_OpAgeCtrl" runat="server"
                                    MaxLength="4" NullText="请输入对方年龄" TabIndex="18" Width="200px">
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px">
                                对方单位：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxTextBox ID="txt_OpCompany" ClientInstanceName="txt_OpCompanyCtrl" runat="server"
                                    MaxLength="50" NullText="请输入对方单位" TabIndex="19" Width="200px">
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxTextBox>
                            </td>
                            <td style="width: 120px">
                                对方地址：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxTextBox ID="txt_OpAddress" ClientInstanceName="txt_OpAddressCtrl" runat="server"
                                    MaxLength="50" NullText="请输入对方地址" TabIndex="20" Width="200px">
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px">
                                对方车辆类型：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxTextBox ID="txt_OpCarType" ClientInstanceName="txt_OpCarTypeCtrl" runat="server"
                                    MaxLength="50" NullText="请选择对方车辆类型" TabIndex="21" Width="200px">
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxTextBox>
                            </td>
                        </tr>
                    </table>
                    <br />
                    <table class="TableNoBorder" style="width: 740px">
                        <tr>
                            <td colspan="2" />
                            <td align="left" style="margin-right: 20px; width: 100px">
                                <dx:ASPxButton ID="btnSave" runat="server" Text="保  存" Width="80px" AutoPostBack="false"
                                    TabIndex="22">
                                    <ClientSideEvents Click="Save" />
                                </dx:ASPxButton>
                            </td>
                            <td align="left" style="margin-right: 20px; width: 100px">
                                <dx:ASPxButton ID="btnCancel" runat="server" Text="重  置" Width="80px" AutoPostBack="false" TabIndex="23">
                                    <ClientSideEvents Click="ResetEdit" />
                                </dx:ASPxButton>
                            </td>
                        </tr>
                    </table>
                    <dx:ASPxCallback ID="cbSave" runat="server" ClientInstanceName="cbSaveCtrl" OnCallback="cbSave_Callback">
                        <ClientSideEvents CallbackComplete="SaveCallback" />
                    </dx:ASPxCallback>
                    <dx:ASPxLoadingPanel ID="lpSave" runat="server" Text="正在提交信息,请稍后..." ClientInstanceName="lpSaveCtrl">
                    </dx:ASPxLoadingPanel>
                </div>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
